//
//  GCD.swift
//  JLCommonKit
//
//  Created by Jiang Chencheng on 2024/8/16.
//

import Foundation

public enum GCD {
    case main
    case gloabl
    case global(qos: DispatchQoS.QoSClass = .default)
    case queue(queue: DispatchQueue)

    public var queue: DispatchQueue {
        switch self {
        case .main: return .main
        case .gloabl: return .global()
        case .global(let qos): return .global(qos: qos)
        case .queue(let queue): return queue
        }
    }
}
